package org.ht.demo.openapi.util;

import lombok.Getter;

@Getter
public enum Damtype {
    amd0(0, "合相"),
    amd1(1, "单相报警"),
    amd2(2, "A相"),
    amd4(4, "B相"),
    amd6(6, "C相");

 

    private Integer amdtype;
    private String amdtypeValue;

    Damtype() {
    }

    Damtype(Integer amdtype, String amdtypeValue) {
        this.amdtype = amdtype;
        this.amdtypeValue = amdtypeValue;
    }

    public static String getDamtype(Integer value) {
        for (Damtype damtype : values()) {
            if (damtype.getAmdtype()==value) {
                return damtype.getAmdtypeValue();
            }
        }
        return "";
    }

   

    @Getter
    public enum Damdress {

        amdress1(1, "短路报警"),
        amdress3(3, "过载报警"),
        amdress4(4, "温度报警"),
        amdress5(5, "漏电报警"),

        amdress6(6, "过流报警"),
        amdress7(7, "过压报警"),
        amdress12(12, "欠压报警"),
        amdress13(13, "过压预警"),

        amdress14(14, "欠压预警"),
        amdress15(15, "漏电预警"),
        amdress16(16, "过流预警"),
        amdress22(22, "温度预警");


        private Integer amdress;
        private String amdressValue;
        Damdress() {
        }

        Damdress(Integer amdress, String amdressValue) {
            this.amdress = amdress;
            this.amdressValue = amdressValue;
        }
        
        public static String getDamdress(Integer value) {
            for (Damdress damdress : values()) {
                if (damdress.getAmdress()==value) {
                    return damdress.getAmdressValue();
                }
            }
            return "";
        }
    }

  

}
